package com.xiaozhen.common.core.domain.driver;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaozhen.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/9/28 16:15
 * @description:
 */
@Data
@TableName("parse_tcp_driver")
@ApiModel(description = "TCP驱动配置")
public class ParseTcpDriver extends BaseEntity {

    @TableId
    @ApiModelProperty(value = "ID")
    private Long driverId;

    @ApiModelProperty(value = "端口号")
    private Integer port;

    @ApiModelProperty(value = "是否开启心跳监测")
    private Boolean heartbeat;

    @ApiModelProperty(value = "心跳监测读超时  单位（秒）")
    private Long readerIdleTime ;

    @ApiModelProperty(value = "心跳监测写超时 单位（秒）")
    private Long writerIdleTime;

    @ApiModelProperty(value = "心跳监测读写超时 单位（秒）")
    private Long allIdleTime;

    @ApiModelProperty(value = "IO类型（默认nio）")
    private String ioType = "nio";

    @ApiModelProperty(value = "前置编解码器")
    private String preCodec;

    @ApiModelProperty(value = "后置编解码器")
    private String postCodec;

    @ApiModelProperty(value = "拆包方式")
    private String decoderWay;

    @ApiModelProperty(value = "拆包配置")
    private String decoder;

    @ApiModelProperty(value = "自己定义的编解码器")
    private String myHandlerWay;

    @TableLogic
    @ApiModelProperty(value = "删除标识（0-正常,1-删除）")
    private Integer delFlag;
}
